﻿using SGV.Entidad;
using SGV.Negocio;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SGV.Win32
{
    public partial class frmDepositoListado : Form
    {
        public frmDepositoListado()
        {
            InitializeComponent();
        }

        private void frmDepositoAgregar_Load(object sender, EventArgs e)
        {
            IniciarControles();
            CargarDatos();
        }

        private void IniciarControles()
        {
            this.Text = "ABM Depósitos";
        }

        private void CargarDatos()
        {
          _dgvDatos.DataSource = Depositos.FindAll();
          
        }

        private void btnClienteNuevo_Click(object sender, EventArgs e)
        {
            frmDepositoAgregar frm = new frmDepositoAgregar();
            frm.MdiParent = this.MdiParent;
            frm.Show();
        }

        private void frmDepositoListado_Activated(object sender, EventArgs e)
        {
            IniciarControles();
            CargarDatos();
        }

    }
}
